package org.im.service.message.bean.rs;

import org.im.service.message.exp.MessageException;

public enum ErrMessageType {
	
	DECODE_ERROR(1000, "消息解析失败"),
	ILLEGAL_OP(1001, "非法的消息操作"),
	NONE_RECEIVER_ERRO(1001, "非法的消息操作")
	;

	private int code;
	
	private String msg;

	private ErrMessageType(int code, String msg) {
		this.code = code;
		this.msg = msg;
	}
	
	public MessageException toMessageResult() {
		return MessageException.error(this);
	}

	public int getCode() {
		return code;
	}

	public String getMsg() {
		return msg;
	}
	
}
